package com.cjh.mybatis09.reflection.invoker;

import lombok.AllArgsConstructor;

import java.lang.reflect.Field;

/**
 * @Descripton getter调用者
 * @Author cjh
 * @Date 2023/6/2 13:49
 */
@AllArgsConstructor
public class GetFieldInvoker implements Invoker{
    private Field field;

    @Override
    public Object invoke(Object target, Object[] args) throws Exception {
        return field.get(target);
    }

    @Override
    public Class<?> getType() {
        return field.getType();
    }
}
